package com.sunelec.service.Imp;

import com.sunelec.mapper.PowerMapper;
import com.sunelec.pojo.Power;
import com.sunelec.pojo.SunElecResult;
import com.sunelec.service.EdictPowerInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import sun.security.provider.Sun;

/**
 * @Author: 郑明利
 * @Description:
 * @Date: Create in 14:46 2018/05/13
 * @Modified By:
 */
@Service
public class EdictPowerInfoServiceImpl implements EdictPowerInfoService{

    @Autowired
    private PowerMapper powerMapper;

    @Override
    public Power selectByPrimaryKey(String powerId){
        Power power = powerMapper.selectByPrimaryKey(powerId);
        return power;
    }

    @Override
    public SunElecResult updatePower(Power power) {
        powerMapper.updateByPrimaryKeySelective(power);
        return SunElecResult.ok();
    }
}
